package com.yanh.common.enums;
public enum ResultCode {
    SUCCESS(200, "成功"),

    FAIL(500, "失败"),
    UNKNOWN_ERROR(500, "未知错误"),
    PARAMETER_ILLEGAL(500, "参数不合法"),
    LOGIN_EMPTY_ERROR(500, "用户名或者密码不能为空"),
    LOGIN_ERROR(500, "用户名或密码错误"),
    LOGIN_STATUS_ERROR(500, "用户已禁用"),
    LOGOUT_ERROR(500, "用户登出失败"),

    TOKEN_INVALID(401, "token 已过期或验证不正确！"),
    TOKEN_SIGNATURE_INVALID(401, "无效的签名"),
    TOKEN_EXPIRED(401, "token 已过期"),
    TOKEN_MISSION(401, "token 缺失"),
    TOKEN_CHECK_INFO_FAILED(401, "token 信息验证失败"),
    REFRESH_TOKEN_INVALID(401, "refreshToken 无效");

    private final Integer code;
    private final String message;
    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    public Integer getCode() {
        return code;
    }
    public String getMessage() {
        return message;
    }
}